# #####################################################################
# Qt project file for the cross-platform Wii Balance Board driver
# Copyright (C) 2009-2010, Dominic Stalder & Thomas Bruederli
# Licensed under the GNU Lesser General Public License (LGPL)
# #####################################################################

TEMPLATE = app
TARGET = wiidevicedriver
DEPENDPATH += .
INCLUDEPATH += .
MOC_DIR = ./temp/moc
OBJECTS_DIR = ./temp/obj
RCC_DIR = ./temp/rcc

HEADERS += wiidevicedriver.h \
	boardwidget.h \
	controllerwidget.h \
	wiideviceconnector.h \
	mainwindow.h
SOURCES += boardwidget.cpp \
	controllerwidget.cpp \
	wiideviceconnector.cpp \
	mainwindow.cpp \
	main.cpp
RESOURCES += wiiboardres.qrc

# Mac-specific configuration and implementation files
macx { 
	LIBS += -framework IOBluetooth
	HEADERS += lib/WiiRemoteFramework/Mii.h \
		lib/WiiRemoteFramework/WiiRemote.h \
		lib/WiiRemoteFramework/WiiRemoteDiscovery.h \
		lib/WiiRemoteFramework/WiiRemotePrivate.h \
		wiimac/wiidevice.h
	SOURCES += lib/WiiRemoteFramework/WiiRemote.m \
		lib/WiiRemoteFramework/WiiRemoteDiscovery.m \
		wiimac/wiidevicedriver.mm \
		wiimac/wiidevice.m \
		xcode/Debug-Prefs.xcconfig \
		xcode/Release-Prefs.xcconfig
}

# Windows specific configuration and implementation files
else:win32 {
	HEADERS += lib/wiiuse/wiiuse.win.h \
		wiiwin/wiiuseconnector.h
	SOURCES += wiiwin/wiidevicedriver.cpp \
		wiiwin/wiiuseconnector.cpp
	LIBS += -Llib/wiiuse -lwiiuse

	Debug {
		CONFIG += console
		system(copy "lib\wiiuse\wiiuse.dll" "debug\wiiuse.dll")
	}
	Release {
		system(copy "lib\wiiuse\wiiuse.dll" "release\wiiuse.dll")
	}
}

# Linux configuration
else {
	HEADERS += lib/wiiuse/wiiuse.h \
		wiiwin/wiiuseconnector.h
	SOURCES += wiiwin/wiidevicedriver.cpp \
		wiiwin/wiiuseconnector.cpp
	LIBS += -lwiiuse
}
